Platform Explorer / Nuxeo Platform 2021.47

Operation Document.CreateVersion (Snapshot Version)

Description

Create a new version for the input document. Any modification made on the document by the chain will be automatically saved. Increment version if this was specified through the 'snapshot' parameter. This operation should not be used in the context of the empty document created, about to create, before document modification, document modified events. Returns the live document (not the version).
Operation id Document.CreateVersion
Category Document
Label Snapshot Version
Requires
Since

Parameters

Name Description Type Required Default value
increment string no None, Minor, Major 
saveDocument Save the document in the session after versioning boolean no  

Signature

Inputs document, documents
Outputs document, documents

Implementation Information

Implementation Class Class: org.nuxeo.ecm.automation.core.operations.document.CreateVersion
Contributing Component org.nuxeo.ecm.core.automation.coreContrib

JSON Definition

{
  "id" : "Document.CreateVersion",
  "label" : "Snapshot Version",
  "category" : "Document",
  "requires" : null,
  "description" : "Create a new version for the input document. Any modification made on the document by the chain will be automatically saved. Increment version if this was specified through the 'snapshot' parameter. This operation should not be used in the context of the empty document created, about to create, before document modification, document modified events. Returns the live document (not the version).",
  "url" : "Document.CreateVersion",
  "signature" : [ "document", "document", "documents", "documents" ],
  "params" : [ {
    "name" : "increment",
    "description" : null,
    "type" : "string",
    "required" : false,
    "widget" : "Option",
    "order" : 0,
    "values" : [ "None", "Minor", "Major" ]
  }, {
    "name" : "saveDocument",
    "description" : "Save the document in the session after versioning",
    "type" : "boolean",
    "required" : false,
    "widget" : "Check",
    "order" : 0,
    "values" : [ ]
  } ]
}